/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import { Request, Response } from 'express';
import { ResponseItem, responseSuccess } from './utils';

import Mock from 'mockjs';

export default {
  'POST /OutRate/getList': (req: Request, res: Response, u: string) => {
    let data = Mock.mock({
      'list|1-10': [
        {
          'id|1-10000': 10000,
          'cm_id|1-1000000': 1000000,
          brand: 'zt',
          in_storage_date: '2022-03-14',
          'rate_one|0-100.1': 0,
          'rate_three|0-100.1': 0,
          'rate_seven|0-100.1': 0,
          inn_name: '虹桥一号驿站',
          phone: '15179185977',
          concat_phone: '0797-5396954',
          brand_cn: '中通',
          is_pass: '1',
          'is_open_collect|1': ['0', '1', '2', '3', '4'],
          is_disable: '0',
        },
      ],
    });
    const result: ResponseItem = {
      code: 0,
      msg: '成功',
      data: data,
    };
    return res.json(result);
  },
  'POST /Inn/closeCollect': (req: Request, res: Response) => responseSuccess(req, res),
  'POST /Inn/closeBrandCollect': (req: Request, res: Response) => responseSuccess(req, res),
  'POST /Inn/closeLogin': (req: Request, res: Response) => responseSuccess(req, res),
  'POST /Inn/closeInStorage': (req: Request, res: Response) => responseSuccess(req, res),
  'POST /OutRate/export': (req: Request, res: Response, u: string) => {
    const result: ResponseItem = {
      code: 0,
      msg: '成功',
      data:
        'http://upload.kuaidihelp.com/admin/bond/csv/2021/12/保证金管理数据导出_20211229154844.csv',
    };
    return res.json(result);
  },
  'POST /Brand/getNeedAssessBrandList': (req: Request, res: Response, u: string) => {
    const result: ResponseItem = {
      code: 0,
      msg: '成功',
      data: {
        yt: '圆通',
        sto: '申通',
      },
    };
    return res.json(result);
  },
};
